package eolica

class EolicaTagLib {
	
	def redirectMobilePage = {
		def valor = request.getHeader('user-agent')
		  if (valor.contains("symbian") || valor.contains("Symbian") || valor.contains("Android") || valor.contains("android")  || valor.contains("iPhone") || valor.contains("iphone")) {
			  session["isMobile"] = true
			  response.sendRedirect("index_m.gsp")			
		  } else {
			 //session["isMobile"] = true
			 session["isMobile"] = false
			 //response.sendRedirect("index_m.gsp")
		  }
		  
	  }
	
	def redirectEolicaIndexPage = {
		response.sendRedirect("/eolica/index_m.gsp")
	}

}
